package com.knight.service.impl;

import com.knight.dao.StudentDao;
import com.knight.service.StudentService;
import com.knight.service.StudentService2;
import com.knight.spring.bean.Student;

public class StudentServiceImpl implements StudentService {
    private StudentDao studentDao;

    private StudentService2 studentService;

    public void setStudentService(StudentService2 studentService) {
        this.studentService = studentService;
    }

    public void setStudentDao(StudentDao studentDao) {
        this.studentDao = studentDao;
    }

    @Override
    public void saveStudent(Student student) {
        studentDao.saveStudent(student);
        Student student1 = new Student();
        student1.setName("wangwu");
        student1.setAge(19);
        studentService.saveStudent(student1);
    }
}
